from flask import Flask
from flask_cors import CORS
from login import app_login
from register import app_register
from openid import app_openid
from particular_authority import app_particular_authority
from company import app_company
from weixin_pay import app_weixin_pay
from Rendering import app_rendering

app = Flask(__name__)
CORS(app)
app.register_blueprint(app_rendering, url_prefix = '/')
app.register_blueprint(app_weixin_pay, url_prefix = '/')
app.register_blueprint(app_login, url_prefix = '/api/v3')
app.register_blueprint(app_openid, url_prefix = '/api/v3')
# app.register_blueprint(app_particular_authority, url_prefix = '/api/v3')
# app.register_blueprint(app_company, url_prefix = '/api/v3')
app.register_blueprint(app_register, url_prefix = '/')

@app.template_filter('slice5')
def sclice5(s):
    return s[:5]

if __name__ == '__main__':

    print(app.url_map)
    app.run(debug=True)
    
    # app.run(debug=True, host = "0.0.0.0", port = "5002")
    